\(\int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 108 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=-\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)} \]

[Out]

-(-a*d+b*c)*ln(d*x+c)/(-c*f+d*e)/(-c*h+d*g)+(-a*f+b*e)*ln(f*x+e)/(-c*f+d*e)/(-e*h+f*g)-(-a*h+b*g)*ln(h*x+g)/(-
c*h+d*g)/(-e*h+f*g)

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {153} \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=-\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)} \]

[In]

Int[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)),x]

[Out]

-(((b*c - a*d)*Log[c + d*x])/((d*e - c*f)*(d*g - c*h))) + ((b*e - a*f)*Log[e + f*x])/((d*e - c*f)*(f*g - e*h))
 - ((b*g - a*h)*Log[g + h*x])/((d*g - c*h)*(f*g - e*h))

Rule 153

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x), x], x] /; FreeQ[{a, b, c, d, e, f, g
, h, m}, x] && (IntegersQ[m, n, p] || (IGtQ[n, 0] && IGtQ[p, 0]))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {d (-b c+a d)}{(d e-c f) (d g-c h) (c+d x)}+\frac {f (-b e+a f)}{(d e-c f) (-f g+e h) (e+f x)}+\frac {h (-b g+a h)}{(d g-c h) (f g-e h) (g+h x)}\right ) \, dx \\ & = -\frac {(b c-a d) \log (c+d x)}{(d e-c f) (d g-c h)}+\frac {(b e-a f) \log (e+f x)}{(d e-c f) (f g-e h)}-\frac {(b g-a h) \log (g+h x)}{(d g-c h) (f g-e h)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.94 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=\frac {(b c-a d) (f g-e h) \log (c+d x)-(b e-a f) (d g-c h) \log (e+f x)+(d e-c f) (b g-a h) \log (g+h x)}{(d e-c f) (d g-c h) (-f g+e h)} \]

[In]

Integrate[(a + b*x)/((c + d*x)*(e + f*x)*(g + h*x)),x]

[Out]

((b*c - a*d)*(f*g - e*h)*Log[c + d*x] - (b*e - a*f)*(d*g - c*h)*Log[e + f*x] + (d*e - c*f)*(b*g - a*h)*Log[g +
 h*x])/((d*e - c*f)*(d*g - c*h)*(-(f*g) + e*h))

Maple [A] (verified)

Time = 1.60 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.00

method result size
default \(\frac {\left (a d -b c \right ) \ln \left (d x +c \right )}{\left (c f -d e \right ) \left (c h -d g \right )}+\frac {\left (a h -b g \right ) \ln \left (h x +g \right )}{\left (c h -d g \right ) \left (e h -f g \right )}-\frac {\left (a f -b e \right ) \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (e h -f g \right )}\) \(108\)
norman \(\frac {\left (a h -b g \right ) \ln \left (h x +g \right )}{c e \,h^{2}-c f g h -d e g h +d f \,g^{2}}+\frac {\left (a d -b c \right ) \ln \left (d x +c \right )}{\left (c f -d e \right ) \left (c h -d g \right )}-\frac {\left (a f -b e \right ) \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (e h -f g \right )}\) \(115\)
parallelrisch \(\frac {\ln \left (d x +c \right ) a d e h -\ln \left (d x +c \right ) a d f g -\ln \left (d x +c \right ) b c e h +\ln \left (d x +c \right ) b c f g -\ln \left (f x +e \right ) a c f h +\ln \left (f x +e \right ) a d f g +\ln \left (f x +e \right ) b c e h -\ln \left (f x +e \right ) b d e g +\ln \left (h x +g \right ) a c f h -\ln \left (h x +g \right ) a d e h -\ln \left (h x +g \right ) b c f g +\ln \left (h x +g \right ) b d e g}{\left (c e \,h^{2}-c f g h -d e g h +d f \,g^{2}\right ) \left (c f -d e \right )}\) \(178\)
risch \(\frac {\ln \left (d x +c \right ) a d}{c^{2} f h -c d e h -c d f g +d^{2} e g}-\frac {\ln \left (d x +c \right ) b c}{c^{2} f h -c d e h -c d f g +d^{2} e g}-\frac {\ln \left (-f x -e \right ) a f}{c e f h -c \,f^{2} g -d \,e^{2} h +d e f g}+\frac {\ln \left (-f x -e \right ) b e}{c e f h -c \,f^{2} g -d \,e^{2} h +d e f g}+\frac {\ln \left (-h x -g \right ) a h}{c e \,h^{2}-c f g h -d e g h +d f \,g^{2}}-\frac {\ln \left (-h x -g \right ) b g}{c e \,h^{2}-c f g h -d e g h +d f \,g^{2}}\) \(233\)

[In]

int((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x,method=_RETURNVERBOSE)

[Out]

(a*d-b*c)/(c*f-d*e)/(c*h-d*g)*ln(d*x+c)+(a*h-b*g)/(c*h-d*g)/(e*h-f*g)*ln(h*x+g)-(a*f-b*e)/(c*f-d*e)/(e*h-f*g)*
ln(f*x+e)

Fricas [A] (verification not implemented)

none

Time = 39.87 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.48 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=-\frac {{\left ({\left (b c - a d\right )} f g - {\left (b c - a d\right )} e h\right )} \log \left (d x + c\right ) - {\left ({\left (b d e - a d f\right )} g - {\left (b c e - a c f\right )} h\right )} \log \left (f x + e\right ) + {\left ({\left (b d e - b c f\right )} g - {\left (a d e - a c f\right )} h\right )} \log \left (h x + g\right )}{{\left (d^{2} e f - c d f^{2}\right )} g^{2} - {\left (d^{2} e^{2} - c^{2} f^{2}\right )} g h + {\left (c d e^{2} - c^{2} e f\right )} h^{2}} \]

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="fricas")

[Out]

-(((b*c - a*d)*f*g - (b*c - a*d)*e*h)*log(d*x + c) - ((b*d*e - a*d*f)*g - (b*c*e - a*c*f)*h)*log(f*x + e) + ((
b*d*e - b*c*f)*g - (a*d*e - a*c*f)*h)*log(h*x + g))/((d^2*e*f - c*d*f^2)*g^2 - (d^2*e^2 - c^2*f^2)*g*h + (c*d*
e^2 - c^2*e*f)*h^2)

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=\text {Timed out} \]

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.24 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=-\frac {{\left (b c - a d\right )} \log \left (d x + c\right )}{{\left (d^{2} e - c d f\right )} g - {\left (c d e - c^{2} f\right )} h} + \frac {{\left (b e - a f\right )} \log \left (f x + e\right )}{{\left (d e f - c f^{2}\right )} g - {\left (d e^{2} - c e f\right )} h} - \frac {{\left (b g - a h\right )} \log \left (h x + g\right )}{d f g^{2} + c e h^{2} - {\left (d e + c f\right )} g h} \]

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="maxima")

[Out]

-(b*c - a*d)*log(d*x + c)/((d^2*e - c*d*f)*g - (c*d*e - c^2*f)*h) + (b*e - a*f)*log(f*x + e)/((d*e*f - c*f^2)*
g - (d*e^2 - c*e*f)*h) - (b*g - a*h)*log(h*x + g)/(d*f*g^2 + c*e*h^2 - (d*e + c*f)*g*h)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.44 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=-\frac {{\left (b c d - a d^{2}\right )} \log \left ({\left | d x + c \right |}\right )}{d^{3} e g - c d^{2} f g - c d^{2} e h + c^{2} d f h} + \frac {{\left (b e f - a f^{2}\right )} \log \left ({\left | f x + e \right |}\right )}{d e f^{2} g - c f^{3} g - d e^{2} f h + c e f^{2} h} - \frac {{\left (b g h - a h^{2}\right )} \log \left ({\left | h x + g \right |}\right )}{d f g^{2} h - d e g h^{2} - c f g h^{2} + c e h^{3}} \]

[In]

integrate((b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="giac")

[Out]

-(b*c*d - a*d^2)*log(abs(d*x + c))/(d^3*e*g - c*d^2*f*g - c*d^2*e*h + c^2*d*f*h) + (b*e*f - a*f^2)*log(abs(f*x
 + e))/(d*e*f^2*g - c*f^3*g - d*e^2*f*h + c*e*f^2*h) - (b*g*h - a*h^2)*log(abs(h*x + g))/(d*f*g^2*h - d*e*g*h^
2 - c*f*g*h^2 + c*e*h^3)

Mupad [B] (verification not implemented)

Time = 5.12 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.18 \[ \int \frac {a+b x}{(c+d x) (e+f x) (g+h x)} \, dx=\frac {\ln \left (e+f\,x\right )\,\left (a\,f-b\,e\right )}{c\,f^2\,g+d\,e^2\,h-c\,e\,f\,h-d\,e\,f\,g}+\frac {\ln \left (g+h\,x\right )\,\left (a\,h-b\,g\right )}{c\,e\,h^2+d\,f\,g^2-c\,f\,g\,h-d\,e\,g\,h}+\frac {\ln \left (c+d\,x\right )\,\left (a\,d-b\,c\right )}{d^2\,e\,g+c^2\,f\,h-c\,d\,e\,h-c\,d\,f\,g} \]

[In]

int((a + b*x)/((e + f*x)*(g + h*x)*(c + d*x)),x)

[Out]

(log(e + f*x)*(a*f - b*e))/(c*f^2*g + d*e^2*h - c*e*f*h - d*e*f*g) + (log(g + h*x)*(a*h - b*g))/(c*e*h^2 + d*f
*g^2 - c*f*g*h - d*e*g*h) + (log(c + d*x)*(a*d - b*c))/(d^2*e*g + c^2*f*h - c*d*e*h - c*d*f*g)